package ngat.oss;

import ngat.phase2.*;
import ngat.util.*;
import java.io.*;

/** Interface which must be implemented by any class which is to act as a Scheduler.
 * ### These method calls need updating.....
*/
public interface Scheduler {

    /** Lock owner ID for RCS_LOCK.*/
    public static final String RCS_LOCK = "RCS";

    /** Returns the current <i>best</> Group available for execution.*/
    public ScheduleDescriptor getBestGroup();

    /** Returns the next available fixed-time constrained Group.*/
    public FixedGroup getNextFixedGroup();

    /** Allows the SchedulerImpl to initialize itself before being called up for a schedule call.*/
    public void init(ConfigurationProperties config);
 
    /** Return the schedulability of the specifed group.*/
    public double getSchedulability(Group group, long from, long to);

    /** Configure the SchedulerImpl from a file layed out as java.util.Properties on construction.*/
    public void configure(File file) throws IOException, IllegalArgumentException;

    /** Configure the SchedulerImpl from a ngat.util.ConfigurationProperties on construction.*/
    public void configure(ConfigurationProperties config) throws IllegalArgumentException;

    /** Allow the SchedulerImpl to dispose of any resources, stop internal Threads etc.*/
    public void dispose();

}
